package com.gmzg.gmzgnews.news.adapters;

import android.content.Context;
import android.support.v4.view.PagerAdapter;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;

import java.util.List;

/**
 * Created by Jasen on 2016 2016/11/1.14:54
 * Email:1142803753@qq.com
 * weixin: aserbao
 */

public class PicturePageAdapter extends PagerAdapter {
    private static final String TAG = "PicturePageAdapter";
    private Context mContext;

    private List<Integer> mImageResources;

    private View.OnClickListener mOnClickListener;

    public PicturePageAdapter(Context context, List<Integer> imageResources) {
        mContext = context;
        mImageResources = imageResources;
    }

    @Override
    public int getCount() {
        int ret = 0;
        ret = mImageResources.size();
        return ret;
    }
    public void setOnJumpNextListener(View.OnClickListener listener){
        mOnClickListener = listener;
    }
    @Override
    public boolean isViewFromObject(View view, Object object) {
        Log.d(TAG, "isViewFromObject");
        return view == object;
    }

    @Override
    public Object instantiateItem(ViewGroup container, int position) {
        return super.instantiateItem(container, position);
    }

}
